<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCrmServiceTaskTable extends Migration
{
    /**
     * Run the migrations.
     *客服任务表
     * @return void
     */
    public function up()
    {
        Schema::create('crm_service_task', function (Blueprint $table) {
            $table->engine = 'MyISAM';
            $table->comment='crm 客服任务表';
            $table->increments('id')->comment('自增键');
            $table->integer('com_uid')->unsigned()->index('com_uid')->default(0)->comment('企业com_id');
            $table->string('log_remarks',2500)->index('log_remarks')->default('')->comment('回访备注');
            $table->timestamp('log_time')->comment('回访时间');
            $table->integer('crm_uid')->unsigned()->index('crm_uid')->default(0)->comment('客服ID');
            $table->tinyInteger('task_type')->unsigned()->default(0)->comment('任务类型,1企业回访');
            $table->tinyInteger('status')->unsigned()->default(0)->comment('0表示未完成，1表示已完成');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('crm_service_task');
    }
}
